﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataStructure
{
    public class Node<T>
    {
        #region 字段
        private T _data;//数据域
        private Node<T> _next;//指向下个结点的指针
        #endregion

        #region 属性
        public T Data
        {
            get { return _data; }
            set { _data = value; }
        }
        

        public Node<T> Next
        {
            get { return _next; }
            set { _next = value; }
        }
        #endregion

        #region 构造函数
        public Node(T data, Node<T> next)
        {
            this._data = data;
            this._next = next;
        }
        public Node(T data)
            : this(data, null)
        { }
        public Node()
            : this(default(T), null)
        { }
        #endregion
    }
}
